﻿using ProsonUser.DomainCurriculum;
using ProsonUser.IProson;
using ProsonUser.ProsonCurriculumDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;

namespace ProsonUser.ProsonCurriculum
{
    public class PCurriculum : ApplicationService, ICurriculum
    {
        private readonly IRepository<tbCurriculum, int> _Curriculum;
        public PCurriculum(IRepository<tbCurriculum, int> users)
        {
            _Curriculum = users;
        }
        //添加课程
        public async  Task<int> AddCourse(CurriculumCreateDTO dto)
        {
            var lst = await _Curriculum.InsertAsync(ObjectMapper.Map<CurriculumCreateDTO, tbCurriculum>(dto));
            return 1;

        }
    }
}
